﻿if exists (select * from dbo.sysobjects where name = 'sp_tb_User_Service_GetByServiceId')
	drop procedure [dbo].[sp_tb_User_Service_GetByServiceId]
Go 
CREATE PROCEDURE dbo.sp_tb_User_Service_GetByServiceId
@ServiceId int
AS
	SELECT * FROM tb_User_Service
 WHERE ServiceId = @ServiceId 
Goif exists (select * from dbo.sysobjects where name = 'sp_tb_User_Service_GetByUsername')
	drop procedure [dbo].[sp_tb_User_Service_GetByUsername]
Go 
CREATE PROCEDURE dbo.sp_tb_User_Service_GetByUsername
@Username varchar(50)
AS
	SELECT * FROM tb_User_Service
 WHERE Username = @Username 
Go